package by.epam.communalservices.entity;

import java.sql.Date;

public class JkhObject {
	
	private Long id;
	
	private Long idOwner;
	
	private String address;
	
	private Date dateLastRepair;
	
	private String name, surname, patronymic;

	public JkhObject() {
	    id = 0L;
	    idOwner = 0L;
	    address = "";
	    dateLastRepair = new Date(1L);
	    name = "";
	    surname = "";
	    patronymic = "";
	}
	
	public JkhObject(Long id, Long idOwner, String address, String surname, String name, String patronymic,
	        Date dateLastRepair) {
		this.id = id;
		this.idOwner = idOwner;
		this.address = address;
		this.name = name;
		this.surname = surname;
		this.patronymic = patronymic;
		this.dateLastRepair = dateLastRepair;
		

	}
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSurname() {
		return surname;
	}

	public void setSurname(String surname) {
		this.surname = surname;
	}

	public String getPatronymic() {
		return patronymic;
	}

	public void setPatronymic(String patronymic) {
		this.patronymic = patronymic;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Date getDateLastRepair() {
		return dateLastRepair;
	}

	public void setDateLastRepair(Date dateLastRepair) {
		this.dateLastRepair = dateLastRepair;
	}

	public Long getIdOwner() {
	    return idOwner;
	}
	
	public void setIdOwner (Long idOwner) {
	    this.idOwner = idOwner;
	}
	
	public String toString() {
		return new StringBuilder().append("[id: ").append(getId())
		        .append(", address: ").append(getAddress()).append(", name: ")
		        .append(getName()).append(", surname: ").append(getSurname())
		        .append(", patronymic: ").append(getPatronymic())
		        .append(", DateLastRepair: ").append(getDateLastRepair())
		        .append(']').toString();
	}
}
